<?php
//echo $this->dojo();
// $table = new Task_Model_DbTable_Task();
$table =  $this->table;
$form = $this->form;
$row = $table->search(Zend_Controller_Front::getInstance()->getRequest()->getUserParams())->current();

?>
<h1>View <?= $this->table->getNiceName() ?>: <?= Bushido_Db_Table::getDisplayValue($row) ?></h1>
<div dojoType="dijit.layout.TabContainer" tabStrip="true">
	<div dojoType="dijit.layout.ContentPane" title="View / Edit">
	<?php 
	
	$pkField = current($table->info(Bushido_Db_Table_Abstract::PRIMARY));
	
	
	echo $form;
	?>
	</div>
	<div dojoType="dijit.layout.ContentPane" title="History" refreshOnShow="true" href="<?= Zend_Controller_Front::getInstance()->getBaseUrl() ?>/<?= Zend_Controller_Front::getInstance()->getRequest()->getModuleName() ?>/<?= Zend_Controller_Front::getInstance()->getRequest()->getControllerName() ?>/audit/useLayout/false/table_name/<?= $table->getName() ?>/row_id/<?= $row->$pkField ?>">
	</div>
	<?php
	/*
<div dojoType="dijit.layout.ContentPane" title="Related History" refreshOnShow="true" href="<?= Zend_Controller_Front::getInstance()->getBaseUrl() ?>/<?= Zend_Controller_Front::getInstance()->getRequest()->getModuleName() ?>/<?= Zend_Controller_Front::getInstance()->getRequest()->getControllerName() ?>/audit/useLayout/false/field/<?= $pkField ?>/new_value/<?= $row->$pkField ?>">
	</div>
	 */
	
	?>
	
</div>